// -----------------------------------------------
// Author:     code34 nicolas_boiteux@yahoo.fr
// Edited by:  Neumatic
// Warcontext: Garbage collector - delete units when are die
// -----------------------------------------------
if (!isServer) exitWith {};

private ["_unit"];

_unit = _this select 0;

if (_unit isKindOf "Man") then {
	sleep wctimetogarbagedeadbody;
	hideBody _unit;
	sleep 3;
} else {
	sleep wctimetorespawnvehicle;
};

deleteVehicle _unit;